﻿using System.ComponentModel;

namespace OMIP.HMS.WPFBusiness
{
        /// <summary>
        /// 提供属性变更通知的基类
        /// </summary>
        public abstract class NotifyPropertyChangedObject : INotifyPropertyChanged
        {
                /// <summary>
                /// 在更改属性值时发生。
                /// </summary>
                public event PropertyChangedEventHandler PropertyChanged;

                /// <summary>
                /// 通知属性值已更改
                /// </summary>
                /// <param name="propertyName">属性名称</param>
                public void NotifyPropertyChanged(string propertyName)
                {
                        if (PropertyChanged != null)
                        {
                                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                        }
                }
        }
}
